package com.itnoob.demo2;

/**
 * 非终结表达式:去除空格
 * @author zhoujun
 * @date 2025/3/26 21:48
 */
public class Trim implements Expression{

    private Expression expression;

    public Trim(Expression expression) {
        this.expression = expression;
    }

    @Override
    public String interpret(String input) {
        //去除空格
        return expression.interpret(input).trim();
    }
}
